﻿using System;

public sealed class SimpleType : IDisposable {
#if false
	public void Dispose() { Console.WriteLine("Dispose"); }
#else
	public void Dispose() { Console.WriteLine("public Dispose"); }
	void IDisposable.Dispose() { Console.WriteLine("IDisposable Dispose"); }
#endif
}

public static class Program {
	public static void Main() {
		SimpleType st = new SimpleType();

		// This calls the public Dispose method implementation
		st.Dispose();

      // This calls IDisposable's Dispose method implementation
		IDisposable d = st;
		d.Dispose();
	}
}
